<style>
    table > tbody > tr > td, table > thead > tr > th {
        border: 1px solid #000000 !important;
        font-size: 16px;
    }
</style>
<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title  am-cf">操作证详情</div>
                </div>
                <div class="widget-body  am-fr">
                    <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                        <div class="am-form-group">
                            <div class="am-btn-toolbar">
                                <div class="am-btn-group am-btn-group-xs">
                                    <button type="button" class="am-btn am-btn-default am-btn-success" id="btnPrint"
                                            onclick="print()">
                                        <span class="am-icon-plus"></span> 打印
                                    </button>
                                    <button type="button" onclick="loadPage('handcertificatebasicinfo/listUI')"
                                            class="am-btn am-btn-default am-btn-danger ">返回
                                    </button>
                                </div>

                                <div class="widget-body am-fr" th:each="record:${detailsHandCertificateBasicList}">

                                    <div class="demo2-bg" id="printContent">
                                        <div style="height: 50px;">
                                        </div>
                                        <table class="table table-bordered am-text-nowrap table-responsive text-center">
                                            <thead>
                                            </thead>
                                            <tbody class="print-border">
                                            <tr class="">
                                                <td colspan="2">
                                                    <span>操作证类型</span>
                                                </td>
                                                <td colspan="2" th:if="${record.certificateType != null}"
                                                    th:switch="${record.certificateType}">
                                                    <span th:case="1">操作证</span>
                                                    <span th:case="2">评估师证</span>
                                                    <span th:case="3">维修技师证</span>
                                                </td>
                                                <td colspan="2">
                                                    <span>机械类型</span>
                                                </td>
                                                <td colspan="2">
                                                    <span
                                                            th:if="${record.machineryType != null}"
                                                            th:switch="${record.machineryType}">
                                                <span th:case="0">挖掘机</span>
                                                    <span th:case="1">装载机</span>
                                                    <span th:case="2">矿用自卸车</span>
                                                    <span th:case="3">推土机</span>
                                                    <span th:case="4">压路机</span>
                                                    <span th:case="5">平地机</span>
                                                    <span th:case="6">混凝土机械</span>
                                                    <span th:case="7">桩工机械</span>
                                                    <span th:case="8">凿岩机械</span>
                                                    <span th:case="9">摊铺机</span>
                                                    <span th:case="10">俩头忙</span>
                                                    <span th:case="11">旋挖钻</span>
                                                    <span th:case="12">叉车</span>
                                            </span>
                                                </td>
                                            </tr>
                                            <tr class="print-tr-margin print-tr-border">
                                                <td colspan="2">
                                                    <span>证件级别</span>
                                                </td>
                                                <td colspan="2"
                                                    th:if="${record.certificateLevel != null}"
                                                    th:switch="${record.certificateLevel}">
                                                    <span th:case="0">初级</span>
                                                    <span th:case="1">中级</span>
                                                    <span th:case="2">高级</span>
                                                    <span th:case="3">专家级</span>
                                                </td>
                                                <td colspan="2">
                                                    <span>姓名</span>
                                                </td>
                                                <td colspan="2">
                                                    <span th:text="${record.name != null} ? ${record.name} : ''"></span>
                                                </td>
                                            </tr>
                                            <tr class="text-center">
                                                <td colspan="2">
                                                    <span>性别</span>
                                                </td>
                                                <td colspan="2">
                                                    <span
                                                            th:if="${record.sex != null}"
                                                            th:switch="${record.sex}">
                                                <span th:case="0">男</span>
                                                <span th:case="1">女</span>
                                            </span>
                                                </td>
                                                <td colspan="2">
                                                    <span>身份证号</span>
                                                </td>
                                                <td colspan="2">
                                                    <span th:text="${record.identityNum != null} ? ${record.identityNum} : ''"></span>
                                                </td>
                                            </tr>
                                            <!--<tr class="text-center">-->
                                                <!--<td>-->
                                                    <!--<span>出生日期</span>-->
                                                <!--</td>-->
                                                <!--<td colspan="1">-->
                                                    <!--<span th:text="${record.birthday != null} ? ${record.birthday} : ''"></span>-->
                                                <!--</td>-->
                                                <!--<td colspan="1">-->
                                                    <!--<span>生产国别</span>-->
                                                <!--</td>-->
                                                <!--<td colspan="1">-->
                                                    <!--<span th:text="${record.productionAddress != null} ? ${record.productionAddress} : ''"></span>-->
                                                <!--</td>-->
                                            <!--</tr>-->
                                            <!--<tr>-->
                                                <!--<td width="90px">-->
                                                    <!--<span>受教育水平</span>-->
                                                <!--</td>-->
                                                <!--<td colspan="1">-->
                                                    <!--<span-->
                                                            <!--th:if="${record.educationLevel != null}"-->
                                                            <!--th:switch="${record.educationLevel}">-->
                                                <!--<span th:case="1">小学</span>-->
                                                <!--<span th:case="2">初中</span>-->
                                                <!--<span th:case="3">初中中专</span>-->
                                                <!--<span th:case="4">高中</span>-->
                                                <!--<span th:case="5">高中中专</span>-->
                                                <!--<span th:case="6">大专</span>-->
                                                <!--<span th:case="7">本科</span>-->
                                                <!--<span th:case="8">硕士研究生</span>-->
                                                <!--<span th:case="9">博士研究生</span>-->
                                            <!--</span>-->
                                                <!--</td>-->
                                                <!--<td colspan="1">-->
                                                    <!--<span>公司名称</span>-->
                                                <!--</td>-->
                                                <!--<td colspan="1">-->
                                                    <!--<span th:text="${record.companyName != null} ? ${record.companyName} : ''"></span>-->
                                                <!--</td>-->
                                            <!--</tr>-->
                                            <tr>
                                                <!--<td height="39px">-->
                                                    <!--<span>籍贯</span>-->
                                                <!--</td>-->
                                                <!--<td><span-->
                                                        <!--th:text="${record.origin != null} ? ${record.origin} : ''"></span>-->
                                                <!--</td>-->
                                                <td colspan="2">
                                                    <span>工作年限</span>
                                                </td>
                                                <td colspan="2">
                                                    <span th:text="${record.workTime != null} ? ${record.workTime} : ''"></span>
                                                </td>
                                                <td colspan="2">
                                                    <span>手机号码</span>
                                                </td>
                                                <td><span
                                                        th:text="${record.phone != null} ? ${record.phone} : ''"></span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="3">
                                                    <span>住址</span>
                                                </td>
                                                <td colspan="4">
                                                    <span th:text="${record.address != null} ? ${record.address} : ''"></span>
                                                </td>
                                                <!--<td>-->
                                                    <!--<span>邮箱</span>-->
                                                <!--</td>-->
                                                <!--<td colspan="1">-->
                                                    <!--<span th:text="${record.email != null} ? ${record.email} : ''"></span>-->
                                                <!--</td>-->
                                            </tr>
                                            <!--<tr>-->
                                                <!--<td height="39px">-->
                                                    <!--<span>证书有效开始时间</span>-->
                                                <!--</td>-->
                                                <!--<td colspan="1">-->
                                                <!--<span th:if="${record.startCerDate != null}"-->
                                                      <!--th:text="${#dates.format(record.startCerDate, 'yyyy-MM-dd')}"></span>-->
                                                <!--</td>-->
                                                <!--<td height="39px">-->
                                                    <!--<span>证书有效结束时间</span>-->
                                                <!--</td>-->
                                                <!--<td colspan="1">-->
                                                <!--<span th:if="${record.endCerDate != null}"-->
                                                      <!--th:text="${#dates.format(record.endCerDate, 'yyyy-MM-dd')}"></span>-->
                                                <!--</td>-->
                                            <!--</tr>-->
                                            <!--<tr>-->
                                                <!--<td height="39px">-->
                                                    <!--<span>培训开始时间</span>-->
                                                <!--</td>-->
                                                <!--<td colspan="1">-->
                                                <!--<span th:if="${record.startTrainDate != null}"-->
                                                      <!--th:text="${#dates.format(record.startTrainDate, 'yyyy-MM-dd')}"></span>-->
                                                <!--</td>-->
                                                <!--<td height="39px">-->
                                                    <!--<span>培训结束时间</span>-->
                                                <!--</td>-->
                                                <!--<td colspan="1">-->
                                                <!--<span th:if="${record.endTrainDate != null}"-->
                                                      <!--th:text="${#dates.format(record.endTrainDate, 'yyyy-MM-dd')}"></span>-->
                                                <!--</td>-->
                                            <!--</tr>-->
                                            <!--<tr>-->
                                                <!--<td>-->
                                                    <!--<span>培训内容</span>-->
                                                <!--</td>-->
                                                <!--<td colspan="1">-->
                                                    <!--<span th:text="${record.trainContent != null} ? ${record.trainContent} : ''"></span>-->
                                                <!--</td>-->
                                            <!--</tr>-->
                                            </tbody>
                                        </table>
                                        <div class="">
                                            <div colspan="1" th:each="record:${detailsList}">
                                                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;操作证照片&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
                                                <span>
                                                     <img th:src="${record!= null} ? ${record} : ''" width="250px"
                                                          height="160px"/>
                                                </span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" th:src="@{/ui/js/jQuery.print.js}"/>
<style type="text/css">
    div img {
        cursor: pointer;
        transition: all 0.6s; /*放大时间*/
    }

    div img:hover {
        transform: scale(2.5); /*放大倍数*/
    }
</style>
<script type="text/javascript">
    function print() {
        $("#printContent").print({
            globalStyles: true,//是否包含父文档的样式，默认为true
            mediaPrint: false,//是否包含media='print'的链接标签。会被globalStyles选项覆盖，默认为false
            stylesheet: null,//外部样式表的URL地址，默认为null

            noPrintSelector: ".no-print",//不想打印的元素的jQuery选择器，默认为".no-print"
            append: null,//将内容添加到打印内容的后面
            prepend: null//将内容添加到打印内容的前面，可以用来作为要打印内容
            //deferred:
            //   $.Deferred()//回调函数
        });
    }
</script>
